﻿
@model PagedList.IPagedList<ITSTOREBLL.SanPham>

@{
    ViewBag.Title = "Sản Phẩm";
}
@foreach (var item in Model)
{       
    <div class="col col_14 product_gallery no_margin_right">
    <a href="SanPham/Details/@Html.DisplayFor(modelItem => item.sp_ID)" ><img src="@Html.DisplayFor(modelItem => item.sp_Hinh)" alt="Product 09" width="200" height="200"/></a>
    <h3>@Html.DisplayFor(modelItem => item.sp_Ten)</h3>
    <p class="product_price">
        <span id="price_update_4"><span id="line_discounted_price_4">@Html.DisplayFor(modelItem => item.sp_Gia) USD</span></span></p>
    <a href="shoppingcart.html" class="add_to_cart">Thêm vào giỏ hàng</a>
    </div>
}
<div class="cleaner"></div>
<p align=center>
    Page @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber)
    of @Model.PageCount
     
    @if (Model.HasPreviousPage)
    {
        @Html.ActionLink("<<", "Index", new { page = 1, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.currentFilter })
        @Html.Raw(" ");
        @Html.ActionLink("< Prev", "Index", new { page = Model.PageNumber - 1, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.currentFilter })
    }
    else
    {
        @:<<
        @Html.Raw(" ");
        @:< Prev
    }
     
    @if (Model.HasNextPage)
    {
        @Html.ActionLink("Next >", "Index", new { page = Model.PageNumber + 1, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.currentFilter })
        @Html.Raw(" ");
        @Html.ActionLink(">>", "Index", new { page = Model.PageCount, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.currentFilter })
    }
    else
    {
        @:Next >
        @Html.Raw(" ")
        @:>>
    }
<p>



